/*
** Lua binding: Interface
** Generated automatically by tolua++-1.0.92 on 03/22/11 11:04:48.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
int tolua_Interface_open (lua_State* tolua_S);

#include "State.h"
#include "Overseer.h"
#include "TitleScreenState.h"

/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"State");
 tolua_usertype(tolua_S,"Overseer");
 tolua_usertype(tolua_S,"TitleScreenState");
}

/* method: getName of class  State */
#ifndef TOLUA_DISABLE_tolua_Interface_State_getName00
static int tolua_Interface_State_getName00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"State",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  State* self = (State*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getName'",NULL);
#endif
 {
  std::string tolua_ret = (std::string)  self->getName();
 tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getName'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: getSingletonPtr of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_getSingletonPtr00
static int tolua_Interface_Overseer_getSingletonPtr00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertable(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
 {
  Overseer* tolua_ret = (Overseer*)  Overseer::getSingletonPtr();
 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Overseer");
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getSingletonPtr'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: getSingleton of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_getSingleton00
static int tolua_Interface_Overseer_getSingleton00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertable(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
 {
  Overseer& tolua_ret = (Overseer&)  Overseer::getSingleton();
 tolua_pushusertype(tolua_S,(void*)&tolua_ret,"Overseer");
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getSingleton'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: changeState of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_changeState00
static int tolua_Interface_Overseer_changeState00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isusertype(tolua_S,2,"State",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  Overseer* self = (Overseer*)  tolua_tousertype(tolua_S,1,0);
  State* s = ((State*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'changeState'",NULL);
#endif
 {
  self->changeState(s);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'changeState'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: pushState of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_pushState00
static int tolua_Interface_Overseer_pushState00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isusertype(tolua_S,2,"State",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  Overseer* self = (Overseer*)  tolua_tousertype(tolua_S,1,0);
  State* s = ((State*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'pushState'",NULL);
#endif
 {
  self->pushState(s);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'pushState'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: popState of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_popState00
static int tolua_Interface_Overseer_popState00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  Overseer* self = (Overseer*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'popState'",NULL);
#endif
 {
  self->popState();
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'popState'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: getCurrentState of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_getCurrentState00
static int tolua_Interface_Overseer_getCurrentState00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  Overseer* self = (Overseer*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getCurrentState'",NULL);
#endif
 {
  State* tolua_ret = (State*)  self->getCurrentState();
 tolua_pushusertype(tolua_S,(void*)tolua_ret,"State");
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getCurrentState'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: exit of class  Overseer */
#ifndef TOLUA_DISABLE_tolua_Interface_Overseer_exit00
static int tolua_Interface_Overseer_exit00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"Overseer",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  Overseer* self = (Overseer*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'exit'",NULL);
#endif
 {
  self->exit();
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'exit'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: getStatus of class  TitleScreenState */
#ifndef TOLUA_DISABLE_tolua_Interface_TitleScreenState_getStatus00
static int tolua_Interface_TitleScreenState_getStatus00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"TitleScreenState",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  TitleScreenState* self = (TitleScreenState*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getStatus'",NULL);
#endif
 {
  std::string tolua_ret = (std::string)  self->getStatus();
 tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getStatus'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
int tolua_Interface_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
 tolua_cclass(tolua_S,"State","State","",NULL);
 tolua_beginmodule(tolua_S,"State");
  tolua_function(tolua_S,"getName",tolua_Interface_State_getName00);
 tolua_endmodule(tolua_S);
 tolua_cclass(tolua_S,"Overseer","Overseer","",NULL);
 tolua_beginmodule(tolua_S,"Overseer");
  tolua_function(tolua_S,"getSingletonPtr",tolua_Interface_Overseer_getSingletonPtr00);
  tolua_function(tolua_S,"getSingleton",tolua_Interface_Overseer_getSingleton00);
  tolua_function(tolua_S,"changeState",tolua_Interface_Overseer_changeState00);
  tolua_function(tolua_S,"pushState",tolua_Interface_Overseer_pushState00);
  tolua_function(tolua_S,"popState",tolua_Interface_Overseer_popState00);
  tolua_function(tolua_S,"getCurrentState",tolua_Interface_Overseer_getCurrentState00);
  tolua_function(tolua_S,"exit",tolua_Interface_Overseer_exit00);
 tolua_endmodule(tolua_S);
 tolua_cclass(tolua_S,"TitleScreenState","TitleScreenState","State",NULL);
 tolua_beginmodule(tolua_S,"TitleScreenState");
  tolua_function(tolua_S,"getStatus",tolua_Interface_TitleScreenState_getStatus00);
 tolua_endmodule(tolua_S);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 int luaopen_Interface (lua_State* tolua_S) {
 return tolua_Interface_open(tolua_S);
};
#endif

